-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support int8 migration versions via new int8-versions feature #330
base: main
Are you sure you want to change the base?
Conversation
d8252fe
to
1277e3e
Compare
This addresses, though does not really *fix* rust-db#83, because it doesn't make refinery support timestamped migrations *by default*, but only if you opt-in to the new feature. However, making it an optional feature neatly sidesteps the unanswered questions in the issue, and so makes the implementation easier to complete and land.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, and thanks for your interest! As I stated on #83 (comment) I'd rather this was not feature gated and instead a function was provided to migrate to int8
. Would you be willing to do that instead?
Thanks
#[cfg(not(feature = "int8-versions"))] | ||
pub type SchemaVersion = i32; | ||
#[cfg(feature = "int8-versions")] | ||
pub type SchemaVersion = i64; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
features in Rust should be additive not mutually exclusive, enabling --all-features
should not break compilation, see here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling --all-features
doesn't, as far as I'm aware, break compilation. CI is all green.
Not at the present time, no. As you identified in #83, there are unanswered design questions with migrating existing users to an int8 column, I don't use the CLI, and the approach in this PR Works For Me(TM). Perhaps one of the commenters from #83, such as @ankhers, might like to use this PR as a basis? |
fb26681
to
666cbd3
Compare
This addresses, though does not really fix #83, because it doesn't make refinery support timestamped migrations by default, but only if you opt-in to the new feature. However, making it an optional feature neatly sidesteps the unanswered questions in the issue, and so makes the implementation easier to complete and land.